package com.uzai.console.mapper;

import com.uzai.console.entity.CdkeysMobileApp;
import org.springframework.stereotype.Repository;

@Repository
public interface CdkeysMobileAppMapper {
    int deleteById(Long id);

    int insert(CdkeysMobileApp record);

    int insertSelective(CdkeysMobileApp record);

    CdkeysMobileApp selectById(Long id);

    CdkeysMobileApp selectByCard(String card);

    /**
     * 查询库存中的一张卡
     * @author liuqi
     * @date 2022/3/4 11:41
     * @return com.uzai.console.entity.CdkeysMobileApp
     */
    CdkeysMobileApp selectStockCard();

    /**
     * 查询使用中已经到期的的一张卡
     * @author liuqi
     * @date 2022/3/4 11:41
     * @return com.uzai.console.entity.CdkeysMobileApp
     */
    CdkeysMobileApp selectExpiredCard(Integer expireTime);

    /**
     * 根据设备号查询
     * @author liuqi
     * @date 2022/3/4 11:41
     * @param deviceId
     * @return com.uzai.console.entity.CdkeysMobileApp
     */
    CdkeysMobileApp selectByDeviceId(String deviceId);

    int updateByIdSelective(CdkeysMobileApp record);

    int updateById(CdkeysMobileApp record);
}